This simple state machine project shows a working example of the State Machine Language that was presented in "Implementing a State Machine Language" in the book AI Game Programming Wisdom.
The demo doesn't do anything impressive, but it is designed to show the minimal amount of code required. Compile the code in Visual C++ and step through the execution to understand how it works. Refer to the article "Implementing a State Machine Language" for detailed explanations.